<?php

/**
 * GcAlunoDisciplina form base class.
 *
 * @method GcAlunoDisciplina getObject() Returns the current form's model object
 *
 * @package    GC
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseGcAlunoDisciplinaForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'aluno_id'      => new sfWidgetFormInputHidden(),
      'disciplina_id' => new sfWidgetFormInputHidden(),
      'nti1'          => new sfWidgetFormInputText(),
      'nti2'          => new sfWidgetFormInputText(),
      'npc'           => new sfWidgetFormInputText(),
      'provao'        => new sfWidgetFormInputText(),
      'feira'         => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'aluno_id'      => new sfValidatorChoice(array('choices' => array($this->getObject()->get('aluno_id')), 'empty_value' => $this->getObject()->get('aluno_id'), 'required' => false)),
      'disciplina_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('disciplina_id')), 'empty_value' => $this->getObject()->get('disciplina_id'), 'required' => false)),
      'nti1'          => new sfValidatorNumber(array('required' => false)),
      'nti2'          => new sfValidatorNumber(array('required' => false)),
      'npc'           => new sfValidatorNumber(array('required' => false)),
      'provao'        => new sfValidatorNumber(array('required' => false)),
      'feira'         => new sfValidatorNumber(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gc_aluno_disciplina[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'GcAlunoDisciplina';
  }

}
